#include "HKCamDriver.h"

using namespace std;    
using namespace cv;    

HKCamDriver m_CamDriver[2];

int main()
{   
    m_CamDriver[0].InitHKNetSDK();
    m_CamDriver[0].SetScaleFactor(0.5f);

    usleep(5000);
    m_CamDriver[0].InitCamera("192.168.110.65","admin","DS-2CD3320D");

    usleep(5000);  

    m_CamDriver[1].InitCamera("192.168.110.64","admin","DS-2CD3320D");

    Mat video[2];

    /* Wait */
    usleep(5000);

    while(1)
    {
        if(m_CamDriver[0].GetCamMat(video[0],NULL,1.0f)){
            imshow("windows::im0",video[0]);
        if(m_CamDriver[1].GetCamMat(video[1],NULL,1.0f)){
            imshow("windows::im1",video[1]);
        }
        waitKey(30);
    }

    return 0;
}
